package com.sina.util;

/**
 * Created by IntelliJ IDEA.
 * User: qtang
 * Date: Jul 4, 2013
 * Time: 2:08:48 PM
 * To change this template use File | Settings | File Templates.
 */
public class StringUtil {

    public static String transferArray2String(String[] stockCodes) {
        if (stockCodes == null || stockCodes.length == 0) {
            return null;
        }
        StringBuilder sb = new StringBuilder(stockCodes[0]);
        final int length = stockCodes.length;
        for (int i = 1; i != length; ++i) {
            sb.append(',');
            sb.append(stockCodes[i]);
        }
        return sb.toString();
    }
}
